<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 700px;
            height: 700px;
            background-color: pink;
            display: flex;
            /* 开启flex布局，是横向布局 */
            flex-direction: row-reverse;
            /* justify-content: space-around; 这个两边都有空隙 */
            /* 下面这个 两边是没有空隙的 */
            /* justify-content: space-between; */
            justify-content: center;
            align-items: center;


        }

        .box1 {
            width: 100px;
            height: 100px;
            background-color: red;
            flex: 2;
        }

        .box2 {
            width: 100px;
            height: 100px;
            background-color: green;
            flex: 2;
        }

        .box3 {
            width: 100px;
            height: 100px;
            background-color: blue;
            flex: 3;
        }

        .box4 {
            width: 100px;
            height: 100px;
            background-color: yellow;
            flex: 3;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box1">box1</div>
        <div class="box2">box2</div>
        <div class="box3">box3</div>
        <div class="box4">box4</div>
    </div>
</body>

</html>